<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="org.apache.commons.logging.Log"%>
<%@ page import="org.apache.commons.logging.LogFactory"%>
<%@ page import="org.apache.commons.collections.MapIterator" %>
<%@ page import="org.apache.commons.collections.map.ListOrderedMap" %>
<%@ page import = "java.util.*,com.ibatis.sqlmap.client.SqlMapClient,com.meetablog.util.SqlMapConfig" %>
<jsp:useBean id="util" class="com.meetablog.util.Util"/>
<%
	String S_EMAIL	= "";
	String S_AUTH 	= "";
	String S_NAME 	= "";
	boolean S_IS_LOGINED;
	
	Log logger;
	logger = LogFactory.getLog(this.getClass());
	
	logger.debug("\n\n\n");
	logger.debug(this.getClass());

	// sqlMap 생성
	SqlMapClient sqlMap =  SqlMapConfig.getSqlMapClient();
	
	// 검색조건 parameter 생성
	HashMap param = new HashMap();	//	검색조건을 담을 해쉬맴 (key, value);
	
%>   
<%--

	HashMap param = new HashMap();	//	검색조건을 담을 해쉬맴 (key, value);
	SqlMapClient sqlMap =  SqlMapConfig.getSqlMapClient();
		
		
	String S_EMAIL = "";
	String S_ISLOGIN = "N";
	String S_AUTH = "";
	
	
	if(null!=session.getAttribute("S_ISLOGIN")){
		S_ISLOGIN = session.getAttribute("S_ISLOGIN").toString();
	}
	
	
	
	if("Y".equals(S_ISLOGIN)){
		param = new HashMap();	//	검색조건을 담을 해쉬맴 (key, value);
		/*
		param.put("COMPANY_CD",request.getParameter("companyCd"));
		param.put("MEMBER_NO",request.getParameter("memberNo"));
		*/
		param.put("COMPANY_CD","0001");
		param.put("MEMBER_NO","h.shimoda");

		ArrayList rs = 	(ArrayList)sqlMap.queryForList("TEST.getSession",param);	//	실행할 SQL ID, 검색조건(없을경우 null)
		
		if(rs.size() > 0){
			session.setAttribute("email", ((HashMap)rs.get(0)).get("EMAIL")); //세션에 값 입력
			session.setAttribute("S_ISLOGIN", "Y"); //세션에 값 입력
			session.setAttribute("auth", ((HashMap)rs.get(0)).get("EMAIL")); //세션에 값 입력 
			S_ISLOGIN = session.getAttribute("S_ISLOGIN").toString(); //세션의 값을 가져올 때 
			S_EMAIL = session.getAttribute("email").toString(); //세션의 값을 가져올 때 
			S_AUTH = session.getAttribute("auth").toString(); //세션의 값을 가져올 때 
			
		}
	}
 
--%> 
